package com.example.basic.web.model.warn;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 储存安全报警
 * </p>
 *
 * @roleor zzl
 * @since 2024-3-14
 */
@Data
@TableName("sys_depot_warn")
@ApiModel(value="DepotWarn对象", description="储存安全报警")
public class DepotWarn extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "序号")
    @TableField("sort_no")
    private Integer sortNo;

    @ApiModelProperty(value = "报警分区")
    @TableField("warn_zone")
    private String warnZone;

    @ApiModelProperty(value = "报警分区")
    @TableField(exist = false)
    private String warnZoneName;

    @ApiModelProperty(value = "总库位")
    @TableField("total_depot")
    private Integer totalDepot;

    @ApiModelProperty(value = "剩余库位")
    @TableField("surplus_depot")
    private Integer surplusDepot;

    @ApiModelProperty(value = "所属仓库")
    @TableField("pharm_code")
    private String pharmCode;

    @ApiModelProperty(value = "所属仓库")
    @TableField(exist = false)
    private String pharmName;

    @ApiModelProperty(value = "报警类型")
    @TableField("warn_type")
    private String warnType;

    @ApiModelProperty(value = "报警时间")
    @TableField("warn_time")
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date warnTime;

    @ApiModelProperty(value = "报警代码")
    @TableField("warn_code")
    private String warnCode;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "报警描述")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "报警解决时间")
    @TableField("release_time")
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date releaseTime;

    @ApiModelProperty(value = "报警解除人")
    @TableField("release_person")
    private String releasePerson;

    @ApiModelProperty(value = "高限位")
    @TableField(exist = false)
    private Integer highLimit;

    @ApiModelProperty(value = "低限位")
    @TableField(exist = false)
    private Integer lowLimit;

}